package com.staff.entity;

import java.io.File;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name="t_staff_contract")
public class StaffContract {//员工合同
	private Long id;
	private String contractNum;
	private String contractType;
	private Date contractStarDate;
	private Date contractEndDate;
	private String position;
	private String contractContent;
	private File file;//电子文档
	private Staff staff;

	private String staffName;
	private String staffNum;
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	public Staff getStaff() {
		return staff;
	}
	
	public String getStaffName() {
		return staffName;
	}
	public String getStaffNum() {
		return staffNum;
	}
	public String getContractType() {
		return contractType;
	}
	public String getContractNum() {
		return contractNum;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getContractStarDate() {
		return contractStarDate;
	}
	@JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
	public Date getContractEndDate() {
		return contractEndDate;
	}
	public String getPosition() {
		return position;
	}
	public String getContractContent() {
		return contractContent;
	}
	public File getFile() {
		return file;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setContractNum(String contractNum) {
		this.contractNum = contractNum;
	}
	public void setContractStarDate(Date contractStarDate) {
		this.contractStarDate = contractStarDate;
	}
	public void setContractEndDate(Date contractEndDate) {
		this.contractEndDate = contractEndDate;
	}
	public void setPosition(String position) {
		this.position = position;
	}
	public void setContractContent(String contractContent) {
		this.contractContent = contractContent;
	}
	public void setFile(File file) {
		this.file = file;
	}
	public void setStaff(Staff staff) {
		this.staff = staff;
	}
	public void setContractType(String contractType) {
		this.contractType = contractType;
	}
	public void setStaffName(String staffName) {
		this.staffName = staffName;
	}
	public void setStaffNum(String staffNum) {
		this.staffNum = staffNum;
	}
	
	
}
